import { Space, Button } from 'antd';

export const fields = [
    {
        type: 'input',
        label: '公司名称',
        name: 'companyNname',
        key: 'companyNname'
    }
]

export const columns = [
    {
        title: '公司名称',
        dataIndex: 'companyNname',
        key: 'companyNname',
        render: (text) => <a>{text}</a>,
    },
    {
        title: '部门',
        dataIndex: 'department',
        key: 'department',
    },
    {
        title: '职位',
        key: 'position',
        dataIndex: 'position'
    },
    {
        title: '定级',
        key: 'grading',
        dataIndex: 'grading'
    },
    {
        title: '操作',
        key: 'operation',
        dataIndex: 'operation',
        width: 250,
        render: (_, record) => (
            <Space size="middle">
                <Button type="primary" size={'small'} onClick={() => edit(record)}>编辑</Button>
                <Button size={'small'} onClick={() => del(record)}>删除</Button>
            </Space>
        )
    },
];

const del = (record) => {
    console.log(record);
}

const edit = (record) => {
    console.log(record);
}